package com.suse.warmstill.common.utils;

/**
 * @author 黄靖
 * @author 2022-10-19 23:58
 * description:
 **/
public class UserIdThreadLocal {
    private UserIdThreadLocal() {
    }

    private static final ThreadLocal<Long> LOCAL = new ThreadLocal<>();

    public static void put(Long userId) {
        LOCAL.set(userId);
    }

    public static Long get() {
        return LOCAL.get();
    }


    public static void remove() {
        LOCAL.remove();
    }

}
